package com.sokal.easycare.modules.order.entity.track;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.hibernate.validator.constraints.Length;

import com.sokal.easycare.common.persistence.DataEntity;
import com.sokal.easycare.modules.order.entity.UserOrder;
import com.sokal.easycare.modules.sys.entity.MainUser;

/**
 * 订单跟踪记录Entity
 * @author nibo
 * @version 2017-03-17
 */
public class OmOrderTrack extends DataEntity<OmOrderTrack> {
	
	private static final long serialVersionUID = 1L;
	private String orderCode;		// 订单号
	private Date createDate;		// 跟踪时间
	private Date updateDate;		// 修改时间
	private String trackStaffId;		// 跟踪人id
	private String orderItemCode;		// 订单项编码
	private MainUser  trackStaffUser;
	private MainUser supervisorUser;
	private String trackStaffName;		// 跟踪人登录明(手机号)
	private String supervisorId;		// 监管人id
	private String trackComments;		// (备注)
	private String type;		// 工单类型 0:销售工单1:安装工单2:设计工单3:采购工单
	private String status;		// 状态 0:待接受 1:已接受,2:处理中,3:已拒绝4:已完成
	private String acceptance;		// 状态 0:发起验收 1:验收通过,2验收不通过
	private String acceptanceType;		// 验收人类型
	private Double price;		// 订单金额
	private String commodityWorkId; //对应商品工单id
	private Double userPayment;		// 用户支付
	private Double salePayment;		// 销售垫款
	private UserOrder userOrder;		
	private List<String> orderItemCodes;		
	private  List<Map<String,String>> workMsg;		
	
	public OmOrderTrack() {
		super();
	}

	public List<Map<String, String>> getWorkMsg() {
		return workMsg;
	}

	public void setWorkMsg(List<Map<String, String>> workMsg) {
		this.workMsg = workMsg;
	}

	public String getCommodityWorkId() {
		return commodityWorkId;
	}

	public void setCommodityWorkId(String commodityWorkId) {
		this.commodityWorkId = commodityWorkId;
	}

	public List<String> getOrderItemCodes() {
		return orderItemCodes;
	}

	public void setOrderItemCodes(List<String> orderItemCodes) {
		this.orderItemCodes = orderItemCodes;
	}

	public String getAcceptanceType() {
		return acceptanceType;
	}

	public void setAcceptanceType(String acceptanceType) {
		this.acceptanceType = acceptanceType;
	}

	public Double getPrice() {
		return price;
	}

	public Double getUserPayment() {
		return userPayment;
	}

	public void setUserPayment(Double userPayment) {
		this.userPayment = userPayment;
	}

	public Double getSalePayment() {
		return salePayment;
	}

	public String getOrderItemCode() {
		return orderItemCode;
	}

	public void setOrderItemCode(String orderItemCode) {
		this.orderItemCode = orderItemCode;
	}

	public void setSalePayment(Double salePayment) {
		this.salePayment = salePayment;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public String getAcceptance() {
		return acceptance;
	}

	public void setAcceptance(String acceptance) {
		this.acceptance = acceptance;
	}

	public OmOrderTrack(String id){
		super(id);
	}

	@Length(min=1, max=30, message="系统自由编码定义，保留长度必须介于 1 和 30 之间")
	public String getOrderCode() {
		return orderCode;
	}

//	public String getOrderItemCode() {
//		return orderItemCode;
//	}
//
//	public void setOrderItemCode(String orderItemCode) {
//		this.orderItemCode = orderItemCode;
//	}

	public void setOrderCode(String orderCode) {
		this.orderCode = orderCode;
	}
	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}

	public String getTrackStaffId() {
		return trackStaffId;
	}

	public void setTrackStaffId(String trackStaffId) {
		this.trackStaffId = trackStaffId;
	}
	
	@Length(min=1, max=255, message="track_staff_name长度必须介于 1 和 255 之间")
	public String getTrackStaffName() {
		return trackStaffName;
	}

	public void setTrackStaffName(String trackStaffName) {
		this.trackStaffName = trackStaffName;
	}
	
	@Length(min=1, max=255, message="track_comments长度必须介于 1 和 255 之间")
	public String getTrackComments() {
		return trackComments;
	}

	public void setTrackComments(String trackComments) {
		this.trackComments = trackComments;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Date getUpdateDate() {
		return updateDate;
	}

	public void setUpdateDate(Date updateDate) {
		this.updateDate = updateDate;
	}

	@Override
	public String toString() {
		return "OmOrderTrack [orderCode=" + orderCode + ", trackDate=" + createDate + ", updateDate=" + updateDate
				+ ", trackStaffId=" + trackStaffId + ", trackStaffName=" + trackStaffName + ", trackComments="
				+ trackComments + ", type=" + type + ", status=" + status + "]";
	}

	public UserOrder getUserOrder() {
		return userOrder;
	}

	public void setUserOrder(UserOrder userOrder) {
		this.userOrder = userOrder;
	}

	public String getSupervisorId() {
		return supervisorId;
	}

	public void setSupervisorId(String supervisorId) {
		this.supervisorId = supervisorId;
	}

	public MainUser getTrackStaffUser() {
		return trackStaffUser;
	}

	public void setTrackStaffUser(MainUser trackStaffUser) {
		this.trackStaffUser = trackStaffUser;
	}

	public MainUser getSupervisorUser() {
		return supervisorUser;
	}

	public void setSupervisorUser(MainUser supervisorUser) {
		this.supervisorUser = supervisorUser;
	}
	
}